#include <stdio.h>

void change_value(int *x, int *y) {
    int t;
    //swap
    t = *x;
    *x = *y;
    *y = t;
    return ;
}
void do_calc(int x , int y, int *m, int *n) {
    int sum1 = 0, sum2= 0;
    sum1 = x + y;
    sum2 = x -y;
    *m = sum1;
    *n = sum2;
    return;
}

int main() {
    /*
        传递变量的地址， 就只能通过指针来接受了
    */
   int a = 0, b = 0;
   int ret1 = 0, ret2 = 0;
   int t = 0;
   printf("please enter two data: ");
   scanf("%d%d", &a , &b);
   printf("a= %d , b = %d \n", a, b);
   do_calc(a, b, &ret1, &ret2);
   printf(" ret1 = %d , ret2 = %d \n", ret1, ret2);
    return 0;
}